<!--
 * @Author: your name
 * @Date: 2020-06-12 17:43:13
 * @LastEditTime: 2020-06-15 18:04:13
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \codeSnippet\front\pages\login.vue
-->
<template>
  <div class="register-container">
    <el-form class="register-form" label-width="100px">
      <el-form-item label="邮箱">
        <el-input placeholder="请输入邮箱"></el-input>
      </el-form-item>
      <el-form-item label="验证码">
        <el-input style="width:160px" placeholder="请输入验证码"></el-input>
        <img style="vertical-align: middle" @click="updateCaptcha" :src="captchaUrl" alt />
      </el-form-item>
      <el-form-item label="昵称">
        <el-input placeholder="请输入昵称"></el-input>
      </el-form-item>
      <el-form-item label="密码">
        <el-input placeholder="请输入密码"></el-input>
      </el-form-item>
      <el-form-item label="确认密码">
        <el-input placeholder="请输入密码"></el-input>
      </el-form-item>
      <el-form-item>
        <el-button @click="registerClick">注册</el-button>
        <el-input placeholder="请输入密码"></el-input>
      </el-form-item>
    </el-form>
  </div>
</template>
<script>
export default {
  layout: 'login',
  data() {
    return {
      form:{},
      reles:[],
      captchaUrl: '/api/captcha'
    };
  },
  mounted(){
    this.updateCaptcha()
  },
  methods: {
    updateCaptcha() {
      this.captchaUrl = '/api/captcha?_t=' + Date.now();
    },
    registerClick(){
      // console.log()
      this.$post('/user/register',{password:123})
    }
  }
};
</script>
<style lang="stylus">
.register-container
  width 400px
  margin 0 auto
</style>
